import { Bi, Ei } from "@/module-00-codebase/pkg-01-container";
import { BaseElmt } from "@/module-00-codebase/pkg-03-abstract";

export class Dc extends BaseElmt<[], Dc> {
  public elmtView() {
    const data = Bi.broker.read("count") || 0;
    return (
      <Ei.Button params={[]} onClick={() => Bi.broker.write("count", data + 1)}>
        {this.props.children}
        <Ei.Text params={[`点击演示状态管理：计数 ${data} `]} />
      </Ei.Button>
    );
  }
}
